package com.tz.basedemo.ui.activity;

import android.view.View;
import android.widget.TextView;

import com.tz.basedemo.R;
import com.tz.basedemo.R2;
import com.tz.basedemo.basecode.base.BaseActivity;
import com.tz.basedemo.ui.biz.MainBiz;
import com.tz.basedemo.ui.component.DaggerMainComponent;
import com.tz.basedemo.ui.contract.MainContract;
import com.tz.basedemo.ui.module.MainModule;
import com.tz.basedemo.ui.presenter.MainPresenter;

import javax.inject.Inject;

import butterknife.BindView;

public class MainActivity extends BaseActivity implements MainContract.View{

    @Inject
    MainPresenter mainPresenter;
    @Inject
    MainBiz mainBiz;

    @BindView(R2.id.hello_text)
    TextView hello_text;

    @Override
    protected void setup() {
        super.setup();
        DaggerMainComponent.builder().mainModule(new MainModule(this)).build().inject(this);
        mainPresenter.setBiz(mainBiz);
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_main;
    }

    @Override
    protected void init() {
        hello_text.setText("asegrhdhdfh");

        hello_text.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mainPresenter.login();
            }
        });

    }

    @Override
    protected void initTitle() {

    }
}
